<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="/res/plugins/hplus/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/res/plugins/hplus/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/res/plugins/hplus/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/res/plugins/hplus/css/animate.css" rel="stylesheet">
    <link href="/res/plugins/hplus/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="/res/plugins/hplus/css/plugins/toastr/toastr.min.css" rel="stylesheet">

</head>

<body class="white-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12" >
            <%--<div class="form-inline" role="form">--%>
                <%--<div class="col-sm-12">--%>
                    <%--<div class="form-group">--%>
                        <%--<span>父级id: </span>--%>
                        <%--<input id="pid" class="form-control w200">--%>
                    <%--</div>--%>
                    <%--<div class="form-group">--%>
                        <%--<div class="col-sm-offset-3 col-sm-8">--%>
                            <%--<button id="ok" type="button" class="btn btn-sm btn-primary pull-right m-t-n-xs">修改直接父级</button>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                <%--</div>--%>
            <%--</div>--%>
                <table id="exampleTableEvents" data-toggle="table" data-mobile-responsive="true">
                <thead>
                <tr>
                    <th data-field="username">用户名</th>
                    <th data-field="sex" data-formatter="sexFormatter">性别</th>
                    <th data-field="createDate">注册日期</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
<script src="/res/plugins/hplus/js/jquery.min.js?v=2.1.4"></script>
<script src="/res/plugins/hplus/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/res/plugins/hplus/js/content.js?v=1.0.0"></script>
<script src="/res/plugins/hplus/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/res/plugins/hplus/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/res/plugins/hplus/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="/res/plugins/hplus/js/plugins/layer/layer.min.js"></script>
<script src="/res/plugins/hplus/js/plugins/toastr/toastr.min.js"></script>

<script>

    function sexFormatter(value) {
        if(value){
            if(value == 1)
                return '男';
            if(value == 2)
                return '女';
            if(value == 0 || value == null)
                return '未知';
        }else{
            return '未知';
        }
    }
    (function() {
        toastr.options = {
            "positionClass" : "toast-top-center"
        };
        $('#exampleTableEvents').bootstrapTable({
            url: "/html/getAllParent.jsp?id=<%=request.getParameter("id")%>",
            search: true,
            pagination: true,
            showRefresh: true,
            showToggle: true,
            showColumns: true,
            iconSize: 'outline',
            toolbar: '#exampleTableEventsToolbar',
            icons: {
                refresh: 'glyphicon-repeat',
                toggle: 'glyphicon-list-alt',
                columns: 'glyphicon-list'
            }
        });


        <%--$('#ok').on('click',function(e){--%>
            <%--$.post('changeParent.jsp?id=<%=request.getParameter("id")%>',{"pid":$.trim($('#pid').val())},function (e) {--%>
                <%----%>
            <%--})--%>
        <%--})--%>



    })();
</script>
</body>

</html>
